import { defineStore } from 'pinia'
import { ref } from 'vue'
import storage from 'storejs'

export const useIndustryStore = defineStore('industryStore', () => {
  const state = ref({
    industry: storage.get('industry') || 0,
  })

  const setIndustry = (payload) => {
    state.value.industry = payload
    storage.set('industry', payload)
  }

  return {
    state,
    setIndustry,
  }
})
